<template>
	<view>
		<u-empty v-if="list.length==0"></u-empty>
		<view class="coll_list" v-else>
			<view class="item u-border-bottom" v-for="(item,index) in list" :key='index' @click='handNavTo(item)'>
				<u-image border-radius='20rpx' class="img" style="" height="170rpx" :src="item.imgUrl">
				</u-image>
				<view class="msg_box">
					<view class="title">
						{{item.title}}
					</view>
					<view class="num">
						{{item.salesVolume}}人购买
					</view>
					<view class="pic_box">
						<view class="pic">
							¥{{item.price}}
						</view>
						<u-icon name="arrow-right"></u-icon>
					</view>
				</view>
			</view>

		</view>
	</view>
</template>

<script>
	import initData from '@/mixin/initData.js'
	export default {
		mixins: [initData],
		data() {
			return {

			};
		},
		mounted() {
			this.miXinInit()
		},
		methods: {
			handNavTo(item) {
				uni.navigateTo({
					url: '/pages/followShop/goodsDetail/goodsDetail?id=' + item.goodsId
				})
			},
			// 请求前的参数处理
			beforeInit() {
				this.apiUrl = "goodsCollection/getMyCollection";
				let params = {
					pageNum: this.pageNum,
					pageSize: this.pageSize,
				};

				this.params = {
					...params
				};
			},
		}
	}
</script>

<style lang="scss" scoped>
	.coll_list {
		.item {
			display: flex;
			padding: 24rpx;

			.img {
				min-width: 170rpx;
				max-width: 170rpx;
				margin-right: 10rpx;
			}

			.msg_box {
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				height: 170rpx;
				width: 100%;

				.pic_box {
					display: flex;
					align-items: center;
					justify-content: space-between;
					width: 100%;

					.pic {
						color: $u-type-primary;
						font-size: 22rpx;

					}
				}

				.num {
					font-size: 24rpx;
					color: #ABABAB;
				}

				.title {
					color: #101010;
					font-size: 26rpx;
					@include ellipsisMultiline(2);
				}
			}
		}
	}
</style>
